<template>
  <div>
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column prop="title" label="审核内容">
        <template slot-scope="{ row }">
          {{ row.sysIdeologicalEducation.name }}
        </template>
      </el-table-column>
      <el-table-column prop="createTime" label="创建人">
        <template slot-scope="{ row }">
          {{ row.flowInitiateUser.userName }}
        </template>
      </el-table-column>
      <el-table-column prop="createTime" label="创建日期"> </el-table-column>
      <el-table-column label="操作" width="180">
        <template slot-scope="{ row }">
          <el-button-group>
            <el-button
              type="primary"
              size="mini"
              v-if="
                !row.hasOwnProperty('approverStatus') || row.approverStatus == 1
              "
              @click="handleReview(row)"
              >评审</el-button
            >
            <el-button
              type="primary"
              size="mini"
              v-if="row.approverStatus > 1"
              @click="handleReviewHistory(row)"
              >评审记录</el-button
            >
          </el-button-group>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import Bus from "@/utils/bus.js";
export default {
  props: ["tableData"],
  methods: {
    handleReview(v) {
      Bus.$emit("showDialogReview", v);
    },
    handleReviewHistory(v) {
      Bus.$emit("showDialogReviewHistory", v);
    },
  },
};
</script>